import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import { defineConfig } from 'rollup';

export default defineConfig({
    input: 'src/index.ts',
    output: [
        {
            file: 'dist/sdk.dev.js',
            format: 'umd',
            name: 'DeviceManager',
        },
        {
            file: 'dist/sdk.js',
            format: 'umd',
            name: 'DeviceManager',
            plugins: [
                terser({
                    mangle: {
                        keep_classnames: true,
                    },
                }),
            ],
        },
    ],
    plugins: [resolve(), typescript()],
});
